package com.ytjj.qmyx.admin.service.function.impl;

import com.github.pagehelper.PageHelper;
import com.ytjj.common.api.CommonPage;
import com.ytjj.qmyx.admin.dao.YxFunctionConfigDAO;
import com.ytjj.qmyx.admin.model.request.OrientAdvertRequest;
import com.ytjj.qmyx.admin.service.function.FunctionConfigService;
import com.ytjj.qmyx.mall.model.YxFunctionConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Slf4j
@Service
public class FunctionConfigServiceImpl implements FunctionConfigService {

    @Resource
    private YxFunctionConfigDAO yxFunctionConfigDAO;

    @Override
    public CommonPage<YxFunctionConfig> queryPage(OrientAdvertRequest param) {
        PageHelper.startPage(param.getPageNum(), param.getPageSize());
        List<YxFunctionConfig> list = yxFunctionConfigDAO.queryPage(param);
        return CommonPage.restPage(list);
    }
}
